﻿namespace UDKDevKitVSX.Utils
{
    using System;
    using System.Diagnostics;
    using UDKDevKitVSX.Exceptions;
    using System.Runtime.InteropServices;

    public class Core
    {
        public static void CheckOk(int hr)
        {
            if (hr != 0)
            {
                throw new ComponentException(hr);
            }
        }

        public static void RequireOk(int hr)
        {
            if (hr != 0)
            {
                Marshal.ThrowExceptionForHR(hr);
            }
        }
    }
}
